#{extends 'adminm/frame.html' /}

#{set 'moreScripts'}
<script src="@{'/public/javascripts/jquery-ui-1.8.10.custom.min.js'}" type="text/javascript" charset="utf-8"></script>
<script src="@{'/public/pager/jquery.pager.js'}" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" src="@{'/public/uploadify/swfobject.js'}"></script>
<script type="text/javascript" src="@{'/public/uploadify/jquery.uploadify.v2.1.4.min.js'}"></script>
#{/set}
#{set 'moreStyles'}
<link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/table.scss'}" />

<link href="@{'/public/uploadify/uploadify.css'}" type="text/css" rel="stylesheet" />
#{/set}
#{set 'activeItem'}1#{/set}

<div class="navigationBar">
	<table>
		<tr>
			<td><img src="@{'/public/images/navigationHouse.gif'}"></td>
			<td><strong>当前位置：</strong></td>
			<td>
				<a href="/admin">首页</a>
				>>
				<a href="/admin/users">用户管理</a>
				>>
				<font class="current">修改用户组</font>
			</td>
		</tr>
	</table>
</div>
<script language="javascript">
function doSubmit() {
	$("#form1").submit();
}
function reset() {
	window.location.href="/admin/users/${user.id};edit";
}
</script>
<div id="errMsg" class="error">
	#{error 'errMsg'/}
</div>
<table class="table_edit">
	<thead>
		<tr>
			<th colspan="2">修改用户组</th>
		</tr>
	</thead>
	<tbody>
		#{form @admin.users.updateUserGroup(), name:'form1', id:'form1'}
		<tr>
			<td class="left" width="40%">ID：</td>
			<td>
				<input type="text" maxlength="30" disabled value="${user.id}">
				<input type="hidden" name='id' maxlength="30" value="${user.id}">
				<font class="require">*</font>&nbsp;
				<span class="error">#{error 'user.id' /}</span>
			</td>
		</tr>
		<tr>
			<td class="left" width="40%">账号：</td>
			<td>
				<input type="text" maxlength="30" disabled value="${user.username}">
				<font class="require">*</font>&nbsp;
				<span class="error">#{error 'user.username' /}</span>
			</td>
		</tr>
		<tr>
			<td class="left" width="40%">真名：</td>
			<td>
				<input type="text" disabled maxlength="30" value="${user.realname}">
				<font class="require">*</font>&nbsp;
				<span class="error">#{error 'user.realname' /}</span>
			</td>
		</tr>
		<tr>
			<td class="left" width="40%">用户组：</td>
			<td>
				<select name="groupId">
					#{if groups}
					#{list items:groups, as:'group'}
					<option value="${group.id}" #{if user.group.id==group.id}selected#{/if}>${group.name}</option>
					#{/list}
					#{/if}
				</select>
			</td>
		</tr>
		#{/form}
	</tbody>
</table>
<br>
<center>
	<input type="button" value="保存" onClick="doSubmit()">&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="button" value="重置" onClick="reset()">
</center>